﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.InteropServices;
using System.Drawing.Text;
using System.Drawing;
using HiStaff.Domain.Sys;
using System.Data;

namespace HiStaff.iSystem
{
    public class Data
    {
        #region private static variables
        private static List<SY_TAB_LIST> listTable;
        private static List<ALL_TABLE> allTable;
        private static DataSet dataList;
        private static List<Domain.CO.CO_SIGN_LST> allCoSign;
        private static List<Domain.PA.PA_SIGN_LST> allPaSign;
        #endregion

        #region public static variables
        public static Color COLOR_REQUIREMENT = Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(222)))));
        public static Color COLOR_NONREQUIREMENT = Color.White;

        public const string COL_ID = "ID";
        public const string COL_NAME = "NAME";
        public const string COL_STATUS = "STATUS";

        public const string PREFIX_TABLE_LIST = "LST_";
        public const string PREFIX_PROC_SELECT_LIST = "APRS_LST_";
        public const string PREFIX_PROC_SELECT = "APRS_";

        public static DataSet DATALIST
        {
            get { return dataList; }
            set { dataList = value; }
        }
        public static List<SY_TAB_LIST> LISTTABLE
        {
            get
            {
                if (listTable == null)
                {
                    listTable = Service.SystemClient.GetAllDataList();
                }
                return listTable;
            }
            set
            {
                listTable = value;
            }
        }
        public static List<ALL_TABLE> ALLTABLE
        {
            get
            {
                if (allTable == null)
                {
                    allTable = Service.SystemClient.GetAllTable();
                }
                return allTable;
            }
            set
            {
                allTable = value;
            }
        }
        public static List<Domain.CO.CO_SIGN_LST> ALLCOSIGN
        {
            get
            {
                if (allCoSign == null)
                    allCoSign = Service.TimeClient.GetAllSignList();
                return allCoSign;
            }
            set { allCoSign = value; }
        }
        public static List<Domain.PA.PA_SIGN_LST> ALLPASIGN
        {
            get
            {
                if (allPaSign == null)
                    allPaSign = Service.PayrollClient.GetAllSignList();
                return allPaSign;
            }
            set { allPaSign = value; }
        }

        #endregion

        #region private method

        #endregion

        #region public method
        
        #endregion
    }
}
